package com.zs.blog.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.annotation.Nullable;
import jakarta.validation.constraints.Positive;
import lombok.Data;
import org.springframework.validation.annotation.Validated;

import java.time.LocalDateTime;

/**
 * @Title: AuthoritySearchDTO
 * @Author zs
 * @Package com.zs.blog.model.dto
 * @Date 2025/9/28 21:13
 * @description: 权限查询条件数据转换对象
 */
@Data
@Validated
public class AuthoritySearchDTO {
    @Schema(description = "权限描述")
    private String authorityDescription;

    @Schema(description = "权限描述符")
    private String authorityDescriptor;

    @Schema(description = "权限所属菜单ID")
    @Nullable
    @Positive
    private Long authorityMenuId;

    @Schema(description = "创建时间-开始时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING)
    private LocalDateTime startTime;

    @Schema(description = "创建时间-结束时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING)
    private LocalDateTime endTime;

    @Schema(description = "页码数")
    private Integer pageNum;

    @Schema(description = "当前页所展示的数据数量")
    private Integer pageSize;
}
